#while 循环
#time 库
import time
import getpass
MyUser = "admin"
MyPass = "123456"
def login():
    varUser = ""
    varPass = ""
    i =1
    n =3
    while i<=3:
        varUser = input("Please enter the user name:")
        varPass = getpass.win_getpass("Please enter the pass word:")
        if(varUser == MyUser and varPass == MyPass):
            print("恭喜您登陆成功!")
            break
        else:
            n = n - 1
            print("抱歉密码或者用户名错误请检查！还剩下"+str(n)+"次机会")
        if n==0:
            print("连续输入错误账号暂时被锁定")
        i+=1
login()
